package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(255)"`
}

type Jd struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30)"`
	Content string `gorm:"type:varchar(255)"`
	Img     string `gorm:"type:varchar(255)"`
	UserID  int    `gorm:"type:int"json:"user_id"`
	User    User   `gorm:"foreignKey:UserID"json:"user"`
}
